PlayerCtl = Ext.extend(CmpControler, {

	bulidComponent : function() {

		var playerStr = "<div id=\"videoPlayer\" style=\"border:1px solid #c3daf9;\">"
				+ "<object ID=\"player\" NAME=\"player\" CLASSID=\"CLSID:F63805DA-AF57-470F-B993-18F0EB444F23\""
				+ "codeBase=\"D3PlayerX.cab\" HEIGHT=\"100%\" WIDTH=\"100%\"></object>"
				+ "</div>";

		var playerPanel = new Ext.Panel({
			html : playerStr
				// region : "east",
				// width : 500
			});

		var picturePanel = new Ext.Panel({
			html : '<img src="image/player.jpg" width="383">'
				// width : 500
			});

		var cmp = new Ext.Panel({
					region : 'west',
					width : 383,
					layout : 'card',
					activeItem : 0,
					split : true,
					items : [playerPanel, picturePanel]
				});

		return cmp;

		//		var cmp = new Ext.Panel({
		//					html : playerStr,
		//					region : 'west',
		//					width : 383,
		//					split : true
		//				});
		//		return cmp;

	},
	afterBulidComponent : function() {

		// player.WorkType = 2;
		// player.VideoStandard = 1;

	},
	open : function(objId) {

		var obj = this.getProgramDetail(objId);

	},
	getProgramDetail : function(objId) {
		var s = cf.getC('s');
		var params = {
			objId : objId
		};

		var para = {
			resource : 'video.do',
			act : 'r',
			params : params,
			cbf : this.play,
			scope : this
		};
		s.request(para);

	},
	play : function(response) {
		
		this.cmp.getLayout().setActiveItem(0);

		var obj = response;
		
		//alert(obj.filePath);

		player.Open(obj.filePath, obj.inpoint, obj.outpoint);

		//player.ClipID = obj.rootId;
		player.CurPos = obj.inpoint;
	},
	showPic : function() {
		this.cmp.getLayout().setActiveItem(1);
	},
	showPlayer : function() {
		this.cmp.getLayout().setActiveItem(0);
	}

});
